<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admmenuliste.php,v $ 
 * $Date: 2005/10/21 12:58:07 $ 
 * $Revision: 1.3 $ 
 * 
 * ********* CVS HEADER ********* 
 */
$message="";
require_once("module/TPLN/TPLN.php"); 
$TPLN = new TPLN; 
$TPLN->Open($op_basepath."tpl/admmenuliste.html"); 
$TPLN->IncludeFile("header","environnement/$session[environnement]/header.php"); 
$TPLN->IncludeFile("footer","environnement/$session[environnement]/footer.php");

require_once(get_path_module("admin"));
$pc = new panneau_controle();
$pc->calculRubriqueParFonction($op);
$TPLN->Parse("panneau_controle",$pc->retourneEntete());

$query="SELECT * FROM rportal_menu ORDER BY nom ASC";
//$message=$query;
$result=rportalrequete($query) or rportalerreur ("$query","?op=");
if(rportalnbresult($result)==0){
    $TPLN->EraseBloc("bloc1");
    $message="Pas encore de menu";
}else{
    $class="liste_impaire"; 
    while($row=rportalligne($result)) {
            $TPLN->Parse("bloc1.nom",$row['nom']); 
            $TPLN->Parse("bloc1.fichier",$row['fichier']); 
            $TPLN->Parse("bloc1.modif","?op=admmenuview&mid=".$row['id']);
            $TPLN->Parse("bloc1.supp","?op=admmenusupp&mid=".$row['id']);
            $TPLN->Parse("bloc1.classe",$class);
            if($class!="liste_impaire") 
            { 
                $class="liste_impaire"; 
            }else{ 
                $class="liste_paire"; 
            } 
    
            $TPLN->Loop("bloc1"); 
    } 
}
$TPLN->Parse("add","?op=admmenuadd&pathid=-1");
$TPLN->Parse("message",$message);
$TPLN->Write(); 
?>